package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * 部门
 * */
@Entity
@Table(name = "section",    catalog = "")
public class Section implements Serializable {
    private Integer id;
    private String secName;
    private String secPlane;
    private String secPrincipal;
    private String secPhone;
    private Long secTime;
    private String secRemove;

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "sec_name")
    public String getSecName() {
        return secName;
    }

    public void setSecName(String secName) {
        this.secName = secName;
    }

    @Basic
    @Column(name = "sec_plane")
    public String getSecPlane() {
        return secPlane;
    }

    public void setSecPlane(String secPlane) {
        this.secPlane = secPlane;
    }

    @Basic
    @Column(name = "sec_principal")
    public String getSecPrincipal() {
        return secPrincipal;
    }

    public void setSecPrincipal(String secPrincipal) {
        this.secPrincipal = secPrincipal;
    }

    @Basic
    @Column(name = "sec_phone")
    public String getSecPhone() {
        return secPhone;
    }

    public void setSecPhone(String secPhone) {
        this.secPhone = secPhone;
    }

    @Basic
    @Column(name = "sec_time")
    public Long getSecTime() {
        return secTime;
    }

    public void setSecTime(Long secTime) {
        this.secTime = secTime;
    }

    @Basic
    @Column(name = "sec_remove")
    public String getSecRemove() {
        return secRemove;
    }

    public void setSecRemove(String secRemove) {
        this.secRemove = secRemove;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Section section = (Section) o;
        return Objects.equals(id, section.id) &&
                Objects.equals(secName, section.secName) &&
                Objects.equals(secPlane, section.secPlane) &&
                Objects.equals(secPrincipal, section.secPrincipal) &&
                Objects.equals(secPhone, section.secPhone) &&
                Objects.equals(secTime, section.secTime) &&
                Objects.equals(secRemove, section.secRemove);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, secName, secPlane, secPrincipal, secPhone, secTime, secRemove);
    }
}
